[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
-                        Subtraction and Set Difference              Operator

  --------------------------------------------------------------------------
  Subtraction

 <exp1> - <exp2>

    The - operator performs subtraction. The result depends upon the
    operands. If either is real, the result is real; otherwise, the result
    is integer. Note that subtraction is NOT commutative, that is, (A-B)
    <> (B-A).

   <exp1>,<exp2>    Any real or integer expression.

    Example:
           I := 3223 - 88;          { I = 3135 }
           X := 3.5 - 4.5;          { X = -1.0 }

  --------------------------------------------------------------------------
  Set Difference

 <set1> - <set2>

    The - operator performs set difference. The result is a set of the
    same base type as the operands, whose members are members of <set1>
    but not <set2>. Note that set difference is NOT commutative, that is,
    (S1 - S2) <> (S2 - S1).

   <set1>,<set2>    Any set expression. Both expressions must be of the
                    same base type.

    Example:
           S := [1,2,5,6] - [2,4,6,8];      { S = [1,5] }

See Also: + mod div * /
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson